id='limitedAngle_fixedFading_6_150_180';
%id='mycandes';
%id='limitedAngle_outerFading_70';
%id='limitedAngle_fixedFading_3_50_70';
imSize=[2^9,2^9];
im=zeros(imSize);
map=get_indexStruct(id,size(im));
%num_rad=log2(sqrt(numel(im)));

%curvelet1=curvelet_mycandes(size(im),0,0);
[curvelet,~]=get_curvelet(id,size(im),0,0,35);
point=curvelet{2};
curvelet1=zeros(imSize);
curvelet1(point(1):point(2),point(3):point(4))=curvelet{1}.^2;
im=im+curvelet1.^2;

tic;
for j=1:length(map)

    for i=1:map(j)
         cur=get_curvelet(id,size(im),j,i);
         point=cur{2};
         cur1=zeros(imSize);
         cur1(point(1):point(2),point(3):point(4))=cur{1}.^2;
        im=im+cur1;
        imagesc(im);
        pause(.1);

    end
end
% for i=1:3
% ones(size(im)).*get_curvelet('mycandes',size(im),4,i);
% end
% 
% toc
% 
% tic;
% for i=1:3
% ones(size(im)).*get_curvelet('mycandes_sparse',size(im),4,i);
% end
 toc